﻿
function dd() {
    alert(8);
}


function submitOfServerControlClicked(event) {

    if (Page_ClientValidate('UserControl')) {

            var resualt = confirm('Are you sure?');

            if (!resualt) {
                alert('Data was not sended');
                event.preventDefault();
            }
            else {
                alert('Data was sended');
            }
        }
    
};

//document.addEventListener('DOMContentLoaded', function () {

//    //add handler to button
//    var submits = document.getElementsByClassName('submitOfUserControl');
//    //var submits = document.getElementById('ServerControlSubmit');

//    var i;
//    for (i = 0; i < submits.length; i++) {
//        submits[i].addEventListener('click', submitOfServerControlClicked, false);
//    }
//}, false);

